package pattern.factory.pizza

import pattern.factory.ingredient.cheese.Cheese
import pattern.factory.ingredient.clames.Clams
import pattern.factory.ingredient.dough.Dough
import pattern.factory.ingredient.pepperoni.Pepperoni
import pattern.factory.ingredient.sauce.Sauce
import pattern.factory.ingredient.veggies.Veggies

import scala.collection.mutable.ArrayBuffer

/**
 * Created by root on 15-9-7.
 */
abstract class Pizza {
  protected var name:String = _
  protected var dough:Dough = _
  protected var sauce:Sauce = _
  protected var veggies:ArrayBuffer[Veggies] = _
  protected var cheese:Cheese = _
  protected var pepperoni:Pepperoni = _
  protected var clams:Clams = _

  def prepare():Unit

  def bake(): Unit ={
    println("Bake for 25 min at 350")
  }

  def cut(): Unit ={
    println("cutting the pizza into diagonal slices")
  }

  def box(): Unit ={
    println("Place pizza in official PizzaStore box")
  }

  def getName() = name

  def setName(name:String): Unit ={
    this.name = name
  }
}
